package me.ling.filter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class NowJava8 {
    public static void main(String[] args) {
        List<String> lines = Arrays.asList("spring", "node", "ricky");

        List list = lines.stream()
                .filter(line -> !"ricky".equals(line))
                .collect(Collectors.toList());
        // we don't like ricky
        list.forEach(System.out::println);
    }
}
